package com.rlz.framemm.model;

import com.rlz.base.base.BaseModel;
import com.rlz.base.base.Resource;
import com.rlz.framemm.api.HomeApi;
import com.rlz.framemm.bean.BannerBean;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

/**
 * Created by RLZ
 * on 2021/4/8
 */
public class HomeModel extends BaseModel {

    public LiveData<Resource<List<BannerBean>>> getBanner() {
        MutableLiveData<Resource<List<BannerBean>>> liveData = new MutableLiveData<>();
        return observe(createService(HomeApi.class).getBanner(), liveData);
    }

}
